/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package db.facadelocals;

import db.entities.GP;
import details.GPDetails;
import details.PatientDetails;
import exceptions.GPNotFoundException;
import exceptions.UsernameAlreadyExistsException;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author jerre
 */
@Local
public interface GPFacadeLocal {

    public void registerGP(String username, String password) throws UsernameAlreadyExistsException;

    public void registerGP(String username, String password, String name, String surname) throws UsernameAlreadyExistsException;

    public void setPassword(String username, String password) throws GPNotFoundException;

    public void setName(String username, String name) throws GPNotFoundException;

    public void setSurName(String username, String surName) throws GPNotFoundException;

    public void addPatientToGP(String usernameGP, String usernamePatient) throws GPNotFoundException;

    public void removePatientFromGP(String usernameGP, String usernamePatient) throws GPNotFoundException;

    public boolean existGP(String username);

    public GPDetails getGP(String username) throws GPNotFoundException;

    public List<String> getPatientsFromGP(String usernameGP) throws GPNotFoundException;

    public List<GPDetails> getAllGPs();

    void create(GP gP);

    void edit(GP gP);

    void remove(GP gP);

    GP find(Object id);

    List<GP> findAll();

}
